package com.ggshily.swf.tag;

import java.io.DataInput;

import com.ggshily.swf.abc.ABCFile;
import com.ggshily.swf.abc.ABCUtil;


public class SWFTagDoABC extends SWFTag
{
	public int flags;
	public String name;
	public ABCFile abc = new ABCFile();
	
	private String packageName;
	private String className;
	
	public void parseData(DataInput di) throws Exception
	{
		flags = di.readInt();
		name = ABCUtil.readUtf8(di);
		
		abc = new ABCFile(di);
	}

	public String decode()
	{
		StringBuilder sb = new StringBuilder();
		sb.append("package ").append(packageName).append("\n");
		sb.append("{\n");
		sb.append("\tpublic class ").append(className).append("\n");
		sb.append("\t{\n");
		sb.append("}\n");
		return sb.toString();
	}
}
